package pres.lnk.learn.designpattern.p_interpreter.impl;

import pres.lnk.learn.designpattern.p_interpreter.Expression;

/**
 * @Author lnk
 * @Date 2018/5/4
 */
public class ContainsExpression implements Expression {
    private String data;

    public ContainsExpression(String data) {
        this.data = data;
    }

    @Override
    public boolean interpret(String context) {
        return context.contains(data);
    }
}
